<template>
  <div class="record">
    <van-swipe
      :width="(150 / 375) * width"
      :show-indicators="false"
      :loop="false"
    >
      <van-swipe-item v-for="(item, index) in lsit" :key="index">
        <doctor-card :item="item" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script lang="ts" setup>
import DoctorCard from './DoctorCard.vue'
import { ref, onMounted } from 'vue'
import { useWindowSize } from '@vueuse/core'
import ke from '@/assets/user/S2.png'
import { getRecentUse } from '@/services/user'
const { width } = useWindowSize()
const lsit = ref([
  {
    name: '201638300111蒋依婷实习生课堂实录1',
    img: ke
  },
  {
    name: '201638300111蒋依婷实习生课堂实录1',
    img: ke
  },
  {
    name: '201638300111蒋依婷实习生课堂实录1',
    img: ke
  },
  {
    name: '201638300111蒋依婷实习生课堂实录1',
    img: ke
  },
  {
    name: '201638300111蒋依婷实习生课堂实录1',
    img: ke
  }
])
const getdata = async () => {
  const res = await getRecentUse({ pageSize: 10, pageNum: 1 })
  lsit.value = res.data
}
onMounted(() => {
  getdata()
})
</script>

<style lang="scss" scoped>
.record {
  width: 100%;
  height: 147px;
}
</style>
